/* AI机器人模块样式 */
.ai-bot-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 100%);
  color: #f3e8ff;
  padding: 2rem 0;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  font-weight: 300;
}

.chat-section {
  display: flex;
  justify-content: center;
}

.chat-container {
  width: 100%;
  max-width: 800px;
  background: rgba(55, 48, 163, 0.8);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.chat-messages {
  height: 600px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.message.user {
  flex-direction: row-reverse;
}

.message.user .message-content {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: white;
  border-radius: 18px 18px 0 18px;
  align-items: flex-end;
}

.message.bot .message-content {
  background: rgba(255, 255, 255, 0.1);
  color: #f3e8ff;
  border-radius: 18px 18px 18px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid transparent;
}

.avatar.user {
  background: linear-gradient(135deg, #ea580c 0%, #ec4899 100%);
  border-color: #ec4899;
}

.avatar.bot {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.message-content {
  max-width: 70%;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(5px);
}

.message-text {
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.message-time {
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: right;
}

.typing {
  opacity: 0.7;
}

.typing .typing-indicator {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.5rem 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: #e9d5ff;
}

.welcome-message .avatar {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.welcome-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #f3e8ff;
}

.welcome-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.8;
}

.chat-input-container {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.action-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #f3e8ff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f3e8ff;
  font-size: 1rem;
  backdrop-filter: blur(5px);
}

.input-group input::placeholder {
  color: rgba(243, 232, 255, 0.6);
}

.input-group input:focus {
  outline: none;
  border-color: #ec4899;
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

.send-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-settings {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 0 0 20px 20px;
}

.settings-content h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #f3e8ff;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item label {
  min-width: 80px;
  font-weight: 500;
}

.setting-item select,
.setting-item input[type="range"],
.setting-item input[type="number"] {
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #f3e8ff;
}

.setting-item input[type="range"] {
  flex: 1;
}

.value-display {
  min-width: 30px;
  text-align: center;
  font-weight: 500;
}

.save-settings {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

.save-settings:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-content {
    padding: 0 1rem;
  }

  .content-header {
    margin-bottom: 2rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .chat-container {
    border-radius: 16px;
  }

  .chat-messages {
    height: 500px;
    padding: 1rem;
  }

  .message-content {
    max-width: 80%;
    padding: 0.75rem 1rem;
  }

  .input-group {
    flex-direction: column;
  }

  .send-btn {
    height: auto;
  }

  .chat-settings {
    padding: 1rem;
  }

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}